package com.cnhis.cloudhealth.clinical.osworks.commonsql.dao;

import com.cnhis.cloudhealth.commons.dao.BaseDao;
import com.cnhis.cloudhealth.commons.utils.Page;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Repository
public class OsCommonSqlDao extends BaseDao{

	@SuppressWarnings("rawtypes")
	public List operatingRoom(Map<String, Object> map) {
		return getSqlSession().selectList("OsCommonSql.operatingRoom",map);
	}

	public String getSysParameters(int ProductID, int ProgramID, int ParamNo) {
		Map<String ,Object> map = new HashMap<String ,Object>(); 
		map.put("ProductID", ProductID);
		map.put("ProgramID", ProgramID);
		map.put("ParamNo", ParamNo);
		return getSqlSession().selectOne("OsCommonSql.getSysParameters",map);
	}

	public Page get1669(Map<String, Object> map, Integer currPage, Integer pageSize) throws Exception {
		return this.queryForPage("OsCommonSql.get1669", map, currPage, pageSize);
	}
	
	public int get1669Count(Map<String, Object> map, Integer currPage, Integer pageSize) throws Exception {
		return getSqlSession().selectOne("OsCommonSql.get1669Count", map);
	}

	public Page get1669_view(Map<String, Object> map, Integer currPage, Integer pageSize) throws Exception {
		return this.queryForPage("OsCommonSql.get1669_view", map, currPage, pageSize);
	}

	public int get1669_viewCount(Map<String, Object> map, Integer currPage, Integer pageSize) throws Exception {
		return getSqlSession().selectOne("OsCommonSql.get1669_viewCount", map);
	}

	@SuppressWarnings("rawtypes")
	public List get834(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get834",map);
	}

	@SuppressWarnings("rawtypes")
	public List get16618(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get16618",map);
	}

	@SuppressWarnings("rawtypes")
	public List get1176Acf01(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get1176Acf01",map);
	}

	@SuppressWarnings("rawtypes")
	public List get1176Acf02(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get1176Acf02",map);
	}

	@SuppressWarnings("rawtypes")
	public List get1670(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get1670",map);
	}

	@SuppressWarnings("rawtypes")
	public List get1670_view(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get1670_view",map);
	}

	@SuppressWarnings("rawtypes")
	public List getVAT1(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.getVAT1",map);
	}

	public String getCBM01VAF1(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectOne("OsCommonSql.getCBM01VAF1",map);
	}

	@SuppressWarnings("rawtypes")
	public List get1662VAF1(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get1662VAF1",map);
	}

	public String getCBM01VAF2(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectOne("OsCommonSql.getCBM01VAF2",map);
	}

	@SuppressWarnings("rawtypes")
	public List get1662VAF2(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get1662VAF2",map);
	}


	public Page get814(Map<String, Object> map, Integer currPage, Integer pageSize)throws Exception {
		return this.queryForPage("OsCommonSql.get814", map, currPage, pageSize);
	}

	public int get814Count(Map<String, Object> map, Integer currPage, Integer pageSize)throws Exception {
		return getSqlSession().selectOne("OsCommonSql.get814Count", map);
	}

	@SuppressWarnings("rawtypes")
	public Page get1663(Map<String, Object> map, Integer currPage, Integer pageSize)throws Exception {
		// TODO Auto-generated method stub
		return this.queryForPage("OsCommonSql.get1663",map, currPage, pageSize);
	}

	public int get1663Count(Map<String, Object> map, Integer currPage, Integer pageSize)throws Exception {
		return getSqlSession().selectOne("OsCommonSql.get1663Count", map);
	}

	@SuppressWarnings("rawtypes")
	public Page get1684(Map<String, Object> map, Integer currPage, Integer pageSize) throws Exception {
		// TODO Auto-generated method stub
		return this.queryForPage("OsCommonSql.get1684",map, currPage, pageSize);
	}

	public int get1684Count(Map<String, Object> map, Integer currPage, Integer pageSize)throws Exception {
		return getSqlSession().selectOne("OsCommonSql.get1684Count", map);
	}


	@SuppressWarnings("rawtypes")
	public List get7257(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get7257",map);
	}

	@SuppressWarnings("rawtypes")
	public List get7257_view(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get7257_view",map);
	}
	
	@SuppressWarnings("rawtypes")
	public List get7257Vaj05(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get7257Vaj05",map);
	}

	@SuppressWarnings("rawtypes")
	public List get802(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get802",map);
	}

	public Page get8027(Map<String, Object> map, Integer currPage, Integer pageSize)throws Exception {
		// TODO Auto-generated method stub
		return this.queryForPage("OsCommonSql.get8027", map, currPage, pageSize);
	}
	
	public int get8027Count(Map<String, Object> map, Integer currPage, Integer pageSize)throws Exception {
		// TODO Auto-generated method stub
		return getSqlSession().selectOne("OsCommonSql.get8027Count", map);
	}

	@SuppressWarnings("rawtypes")
	public List get806() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get806");
	}

	@SuppressWarnings("rawtypes")
	public List get805() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get805");
	}

	@SuppressWarnings("rawtypes")
	public List get804() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get804");
	}
	
	@SuppressWarnings("rawtypes")
	public List get15469() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get15469");
	}

	public List get15468(){
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get15468");
	}
	
	public int get15468Count(Map<String, Object> map, Integer currPage, Integer pageSize) throws Exception {
		// TODO Auto-generated method stub
		return getSqlSession().selectOne("OsCommonSql.get15468Count", map);
	}

	@SuppressWarnings("rawtypes")
	public List getSysParamValue(Map<String, Object> paramMap) throws Exception {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.getSysParamValue",paramMap);
	}

	@SuppressWarnings("rawtypes")
	public List get871() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get871");
	}

	public int systemtParams(Map<String, Object> map) throws Exception {
		// TODO Auto-generated method stub
		return (Integer)this.queryForExtObject("OsCommonSql.systemtParams", map);
	}

	public void insertSysParams(Map<String, Object> map) throws Exception {
		insert("OsCommonSql.insertSysParams", map);
	}

	public int sysParamters(Map<String, Object> map) throws Exception {
		return (Integer) queryForExtObject("OsCommonSql.sysParamters", map);
	}
	
	public void deleteSYSUserParameters(Map<String, Object> map) throws Exception {
		delete("OsCommonSql.deleteSYSUserParameters", map);
	}

	public void deleteUserParams(Map<String, Object> map) throws Exception {
		delete("OsCommonSql.deleteUserParams", map);
	}
	
	@SuppressWarnings("unchecked")
	public Map<String, Object> getParamters(Map<String, Object> map) throws Exception {
		return (Map<String, Object>) queryForExtObject("OsCommonSql.getParamters", map);
	}

	@SuppressWarnings("unchecked")
	public Map<String, Object> getParamNameAndEvent(Map<String, Object> map) throws Exception {
		return (Map<String, Object>) queryForExtObject("OsCommonSql.getParamNameAndEvent", map);
	}

	public void execSYSEventLogsInsert(Map<String, Object> map) throws Exception {
		insert("OsCommonSql.execSYSEventLogsInsert", map);
	}

	public Long execCoreNewIdSYSEventLogs(Map<String, Object> map) throws Exception {
		return (Long) queryForExtObject("OsCommonSql.execCoreNewIdSYSEventLogs", map);
	}

	public void updateSysParams(Map<String, Object> map) throws Exception {
		update("OsCommonSql.updateSysParams", map);
	}

	public Integer queryParams(Map<String, Object> map) throws Exception {
		return (Integer) queryForExtObject("OsCommonSql.queryParams", map);
	}

	public void insertSystemUserParamters(Map<String, Object> map) throws Exception {
		update("OsCommonSql.insertSystemUserParamters", map);
	}

	@SuppressWarnings("rawtypes")
	public List get802ED(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get802ED",map);
	}

	public String getSysParamValueS(Map param) {
		// TODO Auto-generated method stub
		return getSqlSession().selectOne("OsCommonSql.GetSysParamValueS",param);
	}

	public void updateSYSUserParameters(Map<String, Object> map) throws Exception {
		update("OsCommonSql.updateSYSUserParameters", map);
	}

	/**
	 * 院内通知
	 */
	public Page yuanNeiNotice(Map<String, Object> paramMap, Integer page, Integer rows) throws Exception {
		// TODO Auto-generated method stub
		return this.queryForPage("OsCommonSql.yuanNeiNotice", paramMap, page, rows);
	}
	
	@SuppressWarnings("rawtypes")
	public int yuanNeiNoticeCount(Map param) throws Exception{
		return getSqlSession().selectOne("OsCommonSql.yuanNeiNoticeCount", param);
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	public String getPValueBck03e(String bck01e) {
		// TODO Auto-generated method stub
		Map param = new HashMap();
		param.put("bck01e", bck01e);
		return getSqlSession().selectOne("OsCommonSql.getPValueBck03e", param);
	}

	@SuppressWarnings("rawtypes")
	public List get15470() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get15470");
	}

	@SuppressWarnings("rawtypes")
	public List get15471() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get15471");
	}

	@SuppressWarnings("rawtypes")
	public List get836() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get836");
	}

	@SuppressWarnings("rawtypes")
	public List get16805() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get16805");
	}

	@SuppressWarnings("rawtypes")
	public List get16804() {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get16804");
	}

	@SuppressWarnings("rawtypes")
	public List get16618A(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get16618A",map);
	}
	
	@SuppressWarnings("rawtypes")
	public List get16618B(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get16618B",map);
	}

	@SuppressWarnings("rawtypes")
	public List getVao1(String VAT01) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.getVao1",VAT01);
	}
	
	@SuppressWarnings("rawtypes")
	public List getVao2(String VAT01) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.getVao2",VAT01);
	}
	
	@SuppressWarnings("rawtypes")
	public List getVAE1VAA1(String VAE01) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.getVAE1VAA1",VAE01);
	}

	@SuppressWarnings("rawtypes")
	public List getVAC1VAA1(String VAA07) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.getVAC1VAA1",VAA07);
	}

	public Map<String, Object> selectBCE1ByUserID(Integer UserID) {
		// TODO Auto-generated method stub
		return getSqlSession().selectOne("OsCommonSql.selectBCE1ByUserID",UserID);
	}
	
/*	@SuppressWarnings("rawtypes")
	public List get8027(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return getSqlSession().selectList("OsCommonSql.get8027",map);
	}*/
	
	
}
